// 
// @Auther: by wujehy
// @Email:wujehy@qq.com
// @Data:2021/1/31.
// @Time:下午3:45.
// 
//

#include "TestMsgSend.h"

int TestMsgSend::getType()
{
    // 直接返回 模块类型 即可
    return ModuleTypeEnum::Mod_Msg;
}

int TestMsgSend::getSubType()
{
    // 同理返回 子类
    return MsgSubTypeEnum::Msg_Send;
}

const char *TestMsgSend::getInfo()
{
    return "注册的模块是: TestMsgSend";
}

void TestMsgSend::onMessage(std::unique_ptr<DataPacket> packet)
{
    // 这里处理数据包路由到这里的处理情况
    LOGDEBUF() << " 接受到路由信息 - TestMsgSend::onMessage " << std::endl
               << "\t" << "  类型枚举 :" << packet->type << std::endl
               << "\t" << "子类型枚举 :" << packet->subtype << std::endl
               << "\t" << "    code :" << packet->code << std::endl
               << "\t" << "  errmsg :" << packet->errmsg << std::endl
               << "\t" << "    body :" << packet->body << std::endl;
}

TestMsgSend::~TestMsgSend()
{
    LOGDEBUF() << " 正在析构 TestMsgSend " << " type=" << getType() << " subType=" << getSubType() << std::endl;
}
